package com.bdqn.t320.ch06.controller;


import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpSession;
import java.time.LocalDateTime;
import java.util.Date;

@Controller
public class LoginController {

    @RequestMapping("/login")
    public String login() {
        return "login";
    }

    @PostMapping("/doLogin")
    public Object doLogin(String usrName,
                          String usrPassword, @RequestParam(required = false) LocalDateTime birthday,
                          HttpSession session) {
        System.out.println("birthday:" + birthday);
        return null;
    }
}
